1. Field of the Invention
The present invention generally relates to a data. rewriting technique, and particularly relates to data rewriting control when a write fault occurs.
2. Description of the Related Art
In a conventional magnetic disk apparatus, if a write fault occurs while data is being written, data is rewritten in a predetermined number of sectors located before the sector where the write fault has occurred. A conventional technology has been disclosed, for example, in Japanese Patent Application Laid-open No. H5-20789.
The reason for rewriting the data in the sectors located before the sector where the write fault occurs is as follows. Due to intermittent nature of servo sampling for detecting an offtrack position, if a write fault occurs due to the offtrack position or the like, it is probable that data in sectors between a previous servo frame (where it is assumed that data is written at a normal track position) of a servo frame where the offtrack position is detected and a servo frame where the offtrack position is detected is written off track. Therefore, it is necessary to rewrite the data in the sectors between the two servo frames to a center of a track.
That is why it is necessary to rewrite data in all the sectors that include the servo frame where the write fault caused by the offtrack position is detected.
Generally, a magnetic disk is divided into zones from an outer periphery to an inner periphery to increase a recording density of the magnetic disk. The number of sectors varies in every track from the outermost track to the innermost track in a zone. However, the number of servo frames of all the tracks in a zone is the same to keep the servo sampling constant.
More sectors are present between any two servo frames towards the outer periphery, and smaller sectors are present between any two servo frames towards the inner periphery. However, the maximum number of sectors between two frames in the outermost track is generally set as a fixed value for the number of sectors in which the data is to be rewritten.
The number of sectors in which the data is to be rewritten when a write fault occurs is fixed to the maximum number of sectors between two frames in the outermost track, when a write fault occurs in a track towards the inner periphery, which has fewer sectors between the two servo frames, the sectors in which the data is to be rewritten can span across a plurality of servo frames, which adversely affects the performance of the magnetic disk apparatus.
To realize successful rewriting across the servo frames, the rewriting must be carried out continuously for all the servo frames in the target sectors. However, a rewrite success rate falls proportionally with the number of servo frames in the target sectors.
Furthermore, if the magnetic disk apparatus is subjected to continuous jolts (for example, when a user carries the magnetic disk apparatus on a train), the possibility of continuous success of rewriting is quite low for the servo frames in the target sectors. In such a scenario, finally when rewriting cannot be down within predetermined ‘retry time’, the write fault is usually unrecoverable.
A magnetic disk apparatus is often installed in a portable device (such as a portable information tool or a portable music player) and likely to be carried on a train, a plane, during walking or during hiking. The magnetic disk apparatus is constantly at risk of being subjected to continuous jolts or to an environment of atmospheric pressure variation. The magnetic disk apparatus is easily affected by the usage environment of the portable device. It is, therefore, essential to ensure successful rewriting of data in the magnetic disk apparatus.